package artid.com.arttogo.bean;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;

public class LotInfo extends AppItem implements Serializable {
	
	SpecialInfo specInfo = new SpecialInfo();
	LotInfoDet lotInfo = new LotInfoDet();
	
	
	
	public SpecialInfo getSpecInfo() {
		return specInfo;
	}






	public void setSpecInfo(SpecialInfo specInfo) {
		this.specInfo = specInfo;
	}






	public LotInfoDet getLotInfo() {
		return lotInfo;
	}






	public void setLotInfo(LotInfoDet lotInfo) {
		this.lotInfo = lotInfo;
	}






	public class SpecialInfo{
		String id;
		String seller_name;
		String auction_address;
		String title;
		String lot_num;
		String end_time;
		int status;
		String address;
		String start_time;
		String preview_address;
		String lotrecord_num;
		int  is_remind;
		String imgurl;
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public String getSeller_name() {
			return seller_name;
		}
		public void setSeller_name(String seller_name) {
			this.seller_name = seller_name;
		}
		public String getAuction_address() {
			return auction_address;
		}
		public void setAuction_address(String auction_address) {
			this.auction_address = auction_address;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public String getLot_num() {
			return lot_num;
		}
		public void setLot_num(String lot_num) {
			this.lot_num = lot_num;
		}
		public String getEnd_time() {
			return end_time;
		}
		public void setEnd_time(String end_time) {
			this.end_time = end_time;
		}
		public int getStatus() {
			return status;
		}
		public void setStatus(int status) {
			this.status = status;
		}
		public String getAddress() {
			return address;
		}
		public void setAddress(String address) {
			this.address = address;
		}
		public String getStart_time() {
			return start_time;
		}
		public void setStart_time(String start_time) {
			this.start_time = start_time;
		}
		public String getPreview_address() {
			return preview_address;
		}
		public void setPreview_address(String preview_address) {
			this.preview_address = preview_address;
		}
		public String getLotrecord_num() {
			return lotrecord_num;
		}
		public void setLotrecord_num(String lotrecord_num) {
			this.lotrecord_num = lotrecord_num;
		}
		public int getIs_remind() {
			return is_remind;
		}
		public void setIs_remind(int is_remind) {
			this.is_remind = is_remind;
		}
		public String getImgurl() {
			return imgurl;
		}
		public void setImgurl(String imgurl) {
			this.imgurl = imgurl;
		}
		
		
		
	}
	
	
	public class LotInfoDet {
		String seller_name;
		String lot_name;
		int is_follow;
		String logo;
		String commend_num;
		String lot_num;
		String lot_val;
		String is_record;
		String artist_id;
		String art_id;
		String id;
		String follow_num;
		String unit;
		String height;
		String is_artist;
		String lot_price;
		String is_support;
		String jigou_id;
		String realname;
		String chart_num;
		String lotrecord_num;
		String imgurl;
		String special_num;
//		String title;
//		String lot_stprice;
//		String address;
		int is_note;
		String note_content;
		String shareurl;//分享地址
		String lot_memo;//分享内容
		int is_collection;//是否收藏
		
		ArrayList<String> userimg = new ArrayList<String>();

		public String getSeller_name() {
			return seller_name;
		}

		public void setSeller_name(String seller_name) {
			this.seller_name = seller_name;
		}

		public String getLot_name() {
			return lot_name;
		}

		public void setLot_name(String lot_name) {
			this.lot_name = lot_name;
		}

		public int getIs_follow() {
			return is_follow;
		}

		public void setIs_follow(int is_follow) {
			this.is_follow = is_follow;
		}

		public String getLogo() {
			return logo;
		}

		public void setLogo(String logo) {
			this.logo = logo;
		}

		public String getCommend_num() {
			return commend_num;
		}

		public void setCommend_num(String commend_num) {
			this.commend_num = commend_num;
		}

		public String getLot_num() {
			return lot_num;
		}

		public void setLot_num(String lot_num) {
			this.lot_num = lot_num;
		}

		public String getLot_val() {
			return lot_val;
		}

		public void setLot_val(String lot_val) {
			this.lot_val = lot_val;
		}

		public String getIs_record() {
			return is_record;
		}

		public void setIs_record(String is_record) {
			this.is_record = is_record;
		}

		public String getArtist_id() {
			return artist_id;
		}

		public void setArtist_id(String artist_id) {
			this.artist_id = artist_id;
		}

		public String getArt_id() {
			return art_id;
		}

		public void setArt_id(String art_id) {
			this.art_id = art_id;
		}

		public String getId() {
			return id;
		}

		public void setId(String id) {
			this.id = id;
		}

		public String getFollow_num() {
			return follow_num;
		}

		public void setFollow_num(String follow_num) {
			this.follow_num = follow_num;
		}

		public String getUnit() {
			return unit;
		}

		public void setUnit(String unit) {
			this.unit = unit;
		}

		public String getHeight() {
			return height;
		}

		public void setHeight(String height) {
			this.height = height;
		}

		public String getIs_artist() {
			return is_artist;
		}

		public void setIs_artist(String is_artist) {
			this.is_artist = is_artist;
		}

		public String getLot_price() {
			return lot_price;
		}

		public void setLot_price(String lot_price) {
			this.lot_price = lot_price;
		}

		public String getIs_support() {
			return is_support;
		}

		public void setIs_support(String is_support) {
			this.is_support = is_support;
		}

		public String getJigou_id() {
			return jigou_id;
		}

		public void setJigou_id(String jigou_id) {
			this.jigou_id = jigou_id;
		}

		public String getRealname() {
			return realname;
		}

		public void setRealname(String realname) {
			this.realname = realname;
		}

		public String getChart_num() {
			return chart_num;
		}

		public void setChart_num(String chart_num) {
			this.chart_num = chart_num;
		}

		public String getLotrecord_num() {
			return lotrecord_num;
		}

		public void setLotrecord_num(String lotrecord_num) {
			this.lotrecord_num = lotrecord_num;
		}

		public String getImgurl() {
			return imgurl;
		}

		public void setImgurl(String imgurl) {
			this.imgurl = imgurl;
		}

		public String getSpecial_num() {
			return special_num;
		}

		public void setSpecial_num(String special_num) {
			this.special_num = special_num;
		}

		public ArrayList<String> getUserimg() {
			return userimg;
		}

		public void setUserimg(ArrayList<String> userimg) {
			this.userimg = userimg;
		}

		public int getIs_note() {
			return is_note;
		}

		public void setIs_note(int is_note) {
			this.is_note = is_note;
		}

		public String getNote_content() {
			return note_content;
		}

		public void setNote_content(String note_content) {
			this.note_content = note_content;
		}

		public String getShareurl() {
			return shareurl;
		}

		public void setShareurl(String shareurl) {
			this.shareurl = shareurl;
		}

		public String getLot_memo() {
			return lot_memo;
		}

		public void setLot_memo(String lot_memo) {
			this.lot_memo = lot_memo;
		}

		public int getIs_collection() {
			return is_collection;
		}

		public void setIs_collection(int is_collection) {
			this.is_collection = is_collection;
		}
	}

	
	
	
	
	
	@Override
	public void parse(JSONObject objectMain) {
		if (null == objectMain) {
			return;
		}
		JSONObject obj = objectMain.optJSONObject("specialInfo");
		specInfo.address = obj.optString("address");
		specInfo.auction_address = obj.optString("auction_address");
		specInfo.end_time = obj.optString("end_time");
		specInfo.id = obj.optString("id");
		specInfo.imgurl = obj.optString("imgurl");
		specInfo.is_remind = obj.optInt("is_remind");
		specInfo.lot_num = obj.optString("lot_num");
		specInfo.lotrecord_num = obj.optString("lotrecord_num");
		specInfo.preview_address = obj.optString("preview_address");
		specInfo.seller_name = obj.optString("seller_name");
		specInfo.start_time = obj.optString("start_time");
		specInfo.status = obj.optInt("status");
		specInfo.title = obj.optString("title");
		
		obj = objectMain.optJSONObject("lotInfo");
		lotInfo.art_id = obj.optString("art_id");
		lotInfo.artist_id = obj.optString("artist_id");
		lotInfo.chart_num = obj.optString("chart_num");
		lotInfo.commend_num = obj.optString("commend_num");
		lotInfo.follow_num = obj.optString("follow_num");
		lotInfo.height = obj.optString("height");
		lotInfo.id = obj.optString("id");
		lotInfo.imgurl = obj.optString("imgurl");
		lotInfo.is_artist = obj.optString("is_artist");
		lotInfo.is_follow = obj.optInt("is_follow");
		lotInfo.is_record = obj.optString("is_record");
		lotInfo.is_support = obj.optString("is_support");
		lotInfo.jigou_id = obj.optString("jigou_id");
		
		lotInfo.logo = obj.optString("logo");
		lotInfo.lot_name = obj.optString("lot_name");
		
		lotInfo.lot_num = obj.optString("lot_num");
		lotInfo.lot_price = obj.optString("lot_price");
		lotInfo.lot_val = obj.optString("lot_val");
		lotInfo.lotrecord_num = obj.optString("lotrecord_num");
		lotInfo.realname = obj.optString("realname");
		lotInfo.seller_name = obj.optString("seller_name");
		
		lotInfo.special_num = obj.optString("special_num");
		lotInfo.unit = obj.optString("unit");
		lotInfo.is_note = obj.optInt("is_note");
		lotInfo.note_content = obj.optString("note_content");
		lotInfo.shareurl = obj.optString("shareurl");
		lotInfo.lot_memo = obj.optString("lot_memo");
		lotInfo.is_collection = obj.optInt("is_collection");

		lotInfo.userimg = new ArrayList<String>();
		JSONArray iconArr = obj.optJSONArray("userimg");
		for (int i = 0; i < iconArr.length(); i++) {
			String str = iconArr.optString(i);
			lotInfo.userimg.add(str);
		}
		
	}

	

	

}
